<html>
<head><meta charset="utf-8"><title>Analysis stats panic · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html">Analysis stats panic</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="233551372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Analysis%20stats%20panic/near/233551372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Mcnab <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html#233551372">(Apr 07 2021 at 19:57)</a>:</h4>
<p>Is it expected that <code>cargo run -p rust-analyzer --release -- analysis-stats . --with-deps --parallel</code> panics at <a href="https://github.com/rust-analyzer/rust-analyzer/blob/3191a93185b34c6deebca2aad0584d2840ad6d43/crates/hir_ty/src/traits/chalk/mapping.rs#L192">https://github.com/rust-analyzer/rust-analyzer/blob/3191a93185b34c6deebca2aad0584d2840ad6d43/crates/hir_ty/src/traits/chalk/mapping.rs#L192</a> once whilst still pinnning the CPU?</p>



<a name="233551945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Analysis%20stats%20panic/near/233551945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html#233551945">(Apr 07 2021 at 20:00)</a>:</h4>
<p>It's not supposed to hit that panic</p>



<a name="233552063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Analysis%20stats%20panic/near/233552063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Mcnab <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html#233552063">(Apr 07 2021 at 20:01)</a>:</h4>
<p>Ah. Well it apparently can :)</p>



<a name="233552213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Analysis%20stats%20panic/near/233552213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html#233552213">(Apr 07 2021 at 20:02)</a>:</h4>
<p>Looks like that code was recently added when adding <code>GenericArg</code></p>



<a name="233552400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Analysis%20stats%20panic/near/233552400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html#233552400">(Apr 07 2021 at 20:03)</a>:</h4>
<p>But yeah, Chalk sometimes returns lifetimes, and rust-analyzer should have some way to handle that instead of panicking</p>



<a name="233560577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Analysis%20stats%20panic/near/233560577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html#233560577">(Apr 07 2021 at 21:01)</a>:</h4>
<p>I think Jonas mentioned that already in another topic</p>



<a name="233560932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Analysis%20stats%20panic/near/233560932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html#233560932">(Apr 07 2021 at 21:02)</a>:</h4>
<p><span class="user-mention" data-user-id="125131">@detrumi</span> I am actually confused where Chalk would return a lifetime in a substitution without us telling it that it's expected</p>



<a name="233561101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Analysis%20stats%20panic/near/233561101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html#233561101">(Apr 07 2021 at 21:02)</a>:</h4>
<p>the mapping code will go away very soon anyway though</p>



<a name="233566057"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Analysis%20stats%20panic/near/233566057" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html#233566057">(Apr 07 2021 at 21:24)</a>:</h4>
<p>o_O it seems like we're actually requesting a goal with a lifetime variable... where does that come from</p>



<a name="233566474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Analysis%20stats%20panic/near/233566474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html#233566474">(Apr 07 2021 at 21:28)</a>:</h4>
<p>probably from another solution we got from Chalk...</p>



<a name="233566521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Analysis%20stats%20panic/near/233566521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html#233566521">(Apr 07 2021 at 21:28)</a>:</h4>
<p>oh yeah, probably autoderef</p>



<a name="233569896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Analysis%20stats%20panic/near/233569896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrew Chin (eminence) <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html#233569896">(Apr 07 2021 at 21:59)</a>:</h4>
<p>i was in a bisecting mood -- this panic seems to have been introduced in <a href="https://github.com/rust-lang/rust/commit/590c41635952e19c3caae525a827499dbd360049">590c41635952e19c3caae525a827499dbd360049</a> <a href="https://github.com/rust-analyzer/rust-analyzer/pull/8136">https://github.com/rust-analyzer/rust-analyzer/pull/8136</a></p>



<a name="233617090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Analysis%20stats%20panic/near/233617090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html#233617090">(Apr 08 2021 at 08:09)</a>:</h4>
<p>Interesting, I was assuming it started when the <code>unimplemented!</code> line was added, but according to your bisect it was in before that?</p>



<a name="233617199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Analysis%20stats%20panic/near/233617199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html#233617199">(Apr 08 2021 at 08:10)</a>:</h4>
<p>That PR changed <code>Dyn</code> types, so maybe that's the source of the lifetime?</p>



<a name="233632241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Analysis%20stats%20panic/near/233632241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html#233632241">(Apr 08 2021 at 10:37)</a>:</h4>
<p>are you sure that's not another crash? I think I fixed one introduced by that PR</p>



<a name="233632367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Analysis%20stats%20panic/near/233632367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html#233632367">(Apr 08 2021 at 10:38)</a>:</h4>
<p>I'm pretty sure I know what's going on with this one, but I think it will probably be fixed or need a different fix with the Chalk move, so I'm leaving it</p>



<a name="233644125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Analysis%20stats%20panic/near/233644125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrew Chin (eminence) <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html#233644125">(Apr 08 2021 at 12:33)</a>:</h4>
<p>yeah, it's 100% possible that my bisect found an unrelated crash</p>



<a name="233645199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Analysis%20stats%20panic/near/233645199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html#233645199">(Apr 08 2021 at 12:41)</a>:</h4>
<p>it crashes differently with the Chalk move now <span aria-label="grimacing" class="emoji emoji-1f62c" role="img" title="grimacing">:grimacing:</span></p>



<a name="233647704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Analysis%20stats%20panic/near/233647704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrew Chin (eminence) <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html#233647704">(Apr 08 2021 at 13:00)</a>:</h4>
<p>progress, perhaps :)</p>



<a name="233790639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Analysis%20stats%20panic/near/233790639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Analysis.20stats.20panic.html#233790639">(Apr 09 2021 at 09:18)</a>:</h4>
<p><a href="https://github.com/rust-analyzer/rust-analyzer/issues/8440">rust-analyzer/rust-analyzer#8440</a> fixes it</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>